<{if is_object($itemO)}> 
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<title><{$sitename}> <{$lang_imgmanager}></title>
<script type="text/javascript">
<!--//
function appendCode(addCode) {
	var targetDom = window.opener.xoopsGetElementById('<{$target}>');
	if (targetDom.createTextRange && targetDom.caretPos){
  		var caretPos = targetDom.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) 
== ' ' ? addCode + ' ' : addCode;  
	} else if (targetDom.getSelection && targetDom.caretPos){
		var caretPos = targetDom.caretPos;
		caretPos.text = caretPos.text.charat(caretPos.text.length - 1)  
== ' ' ? addCode + ' ' : addCode;
	} else {
		targetDom.value = targetDom.value + addCode;
  	}
	window.close();
	return;
}
//-->
</script>
<style type="text/css" media="all">
body {margin: 0;}
img {border: 0;}
table {width: 100%; margin: 0;}
a:link {color: #3a76d6; font-weight: bold; background-color: transparent;}
a:visited {color: #9eb2d6; font-weight: bold; background-color: transparent;}
a:hover {color: #e18a00; background-color: transparent;}
table td {background-color: white; font-size: 12px; padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
table#imagenav td {vertical-align: bottom; padding: 5px;}
table#imagemain td {border-right: 1px solid silver; border-bottom: 1px solid silver; padding: 5px; vertical-align: middle;}
table#imagemain th {border: 0; background-color: #2F5376; color:white; font-size: 12px; padding: 5px; vertical-align: top; text-align:center; font-family: Verdana, Arial, Helvetica, sans-serif;}
table#header td {width: 100%; background-color: #2F5376; vertical-align: middle;}
table#header td#headerbar {border-bottom: 1px solid silver; background-color: #dddddd;}
div#pagenav {text-align:center;}
div#footer {text-align:right; padding: 5px;}
</style>
</head>

<body onload="window.resizeTo(<{$xsize}>, <{$ysize}>);">
<a href="<{$smarty.const.XOOPS_URL}>/goimagemanager.php?op=edit&id=<{$itemO->getVar('id')}>&handler=<{$smarty.get.handler}>&module=<{$smarty.get.module}>"><{$smarty.const._EDIT}></a>
<{if $xoopsimage2items|@count}>
  <table cellspacing="0" id="imagemain">
	<tr>
	<th>
	<{$smarty.const._MD_neosystem_IMAGE}>
	</th>
	<th>
	<{$smarty.const._MD_neosystem_ALIGN}>
	</th>
	</tr>
<{foreach item=xoopsimage2itemO from=$xoopsimage2items}>
<{assign var=xoopsimage2item_id value=$xoopsimage2itemO->getVar("xoopsimage_id")}>

<{assign var=xoopsimageO value=$xoopsimageH->get($xoopsimage2item_id)}>

<{if file_exists($smarty.const.XOOPS_UPLOAD_PATH|cat:"/"|cat:"thmb_"|cat:$xoopsimageO->getVar("image_name"))}>
<tr>

<td><img src="<{$smarty.const.XOOPS_UPLOAD_URL}>/thmb_<{$xoopsimageO->getVar("image_name")}>"></td>
<td>
<{foreach item=imagecatO from=$imagecats}>
			
	<{if file_exists($smarty.const.XOOPS_UPLOAD_PATH|cat:"/"|cat:$imagecatO->getVar("prefix")|cat:$xoopsimageO->getVar("image_name"))}>
		<{if $imagecatO->getVar("width")}> 	
			<{$imagecatO->getVar("width")}>x<{$imagecatO->getVar("width")}><br/>
		<{else}>	
			<{assign var="xoopsimagecat_id" value=$imagecatO->getVar("xoopsimagecat")}>
			<{assign var="xoopsimagecatO" value=$xoopsimagecategories[$xoopsimagecat_id]}>
			<{$xoopsimagecatO->getVar("imgcat_maxwidth")}>x<{$xoopsimagecatO->getVar("imgcat_maxheight")}>
		<{/if}>
			<a href="#" onclick="javascript:appendCode('[img align=left]<{$smarty.const.XOOPS_UPLOAD_URL}>/<{$imagecatO->getVar("prefix")}><{$xoopsimageO->getVar("image_name")}>[/img]');"><img src="<{$smarty.const.XOOPS_URL}>/images/alignleft.gif" alt="left" /></a>
			<a href="#" onclick="javascript:appendCode('[img]<{$smarty.const.XOOPS_UPLOAD_URL}>/<{$imagecatO->getVar("prefix")}><{$xoopsimageO->getVar("image_name")}>[/img]');"><img src="<{$smarty.const.XOOPS_URL}>/images/aligncenter.gif" alt="Center" /></a>
			<a href="#" onclick="javascript:appendCode('[img align=right]<{$smarty.const.XOOPS_UPLOAD_URL}>/<{$imagecatO->getVar("prefix")}><{$xoopsimageO->getVar("image_name")}>[/img]');"><img src="<{$smarty.const.XOOPS_URL}>/images/alignright.gif" alt="right" /></a>			
			<br/>
		
	<{/if}>
<{/foreach}>
</td>

</tr>
<{/if}>
<{/foreach}>

</table>

<{else}>
<{/if}>
<table>
<tr><td align=center><{$smarty.const._MD_neosystem_NOIMAGES}></td></tr>
</table>
</body>
</html>
<{/if}>